﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
using DAL;
namespace BLL
{
    public class BLLCMS_Article
    {
        DALCMS_Article DALCMS_Article = new DALCMS_Article();
        public List<CMS_Article> GetCMS_ArticleALL()
        {
            return DALCMS_Article.GetCMS_ArticleALL();
        }

        public int InsertCMS_Article(CMS_Article CMS_Article)
        {
            return DALCMS_Article.InsertCMS_Article(CMS_Article);
        }

        public int UpdateCMS_Article(CMS_Article CMS_Article)
        {
            return DALCMS_Article.UpdateCMS_Article(CMS_Article);
        }
        public int DeleteCMS_Articles(int id)
        {
            return DALCMS_Article.DeleteCMS_Articles(id);
        }

        public List<View_Article> GetCMS_ArticleAll()
        {
            return DALCMS_Article.GetCMS_ArticleAll();
        }
        public string GetPageCMS_Articles(int pageindex, int pagesize, string aid)
        {
            return DALCMS_Article.GetPageCMS_Articles(pageindex, pagesize, aid);
        }

        public bool DelectArticle(int? id)
        {
            return DALCMS_Article.DeleteCMS_Articles(id) > 0;
        }
    }
}
